﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Buddy.Samples
{
    static partial class Program 
    {
        static void Samples_Flow()
        {
            using (var log = new Flow("Scope(My Method/Function)", s => Console.WriteLine(s)))
            {
                log.Log(string.Format("id:{0}", Thread.CurrentThread.ManagedThreadId));
                log.Log("done");
                log.Log("all log entries will be dumped together as a single entry;");
                log.Log("because of that you can see your steps in a method, executing in parallel with other parts,");
                log.Log("and those steps are not logged as scattered entries");
            }

            Console.WriteLine("press any key to continue ...");
            Console.ReadKey();
        }
    }
}
